package com.empsys.service.impl;

import com.empsys.mapper.DeptLogMapper;
import com.empsys.pojo.DeptLog;
import com.empsys.service.DeptLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author wzm
 * @create 2023-12-15 16:36
 * project_name:web2310
 * @Description
 */
@Service
public class DeptLogServiceImpl implements DeptLogService {
    @Autowired
    private DeptLogMapper deptLogMapper;


    @Transactional(propagation = Propagation.REQUIRES_NEW) //事务传播行为 无论父方法有无事务 自己都创建一个
    @Override
    public void insert(DeptLog deptLog) {
        deptLogMapper.insert(deptLog);
    }
}
